using System;
using System.Web.UI;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Users;
using DotNetNuke.Services.Localization;

namespace Code5Systems.FormMaster
{
	
	public partial class FormLicenseMgr : DotNetNuke.Entities.Modules.PortalModuleBase
	{
		
#region  Web Form Designer Generated Code
		
		//This call is required by the Web Form Designer.
		[System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent()
		{
			
		}
		
		//NOTE: The following placeholder declaration is required by the Web Form Designer.
		//Do not delete or move it.
		private System.Object designerPlaceholderDeclaration;
		
		private void Page_Init(System.Object sender, System.EventArgs e)
		{
			//CODEGEN: This method call is required by the Web Form Designer
			//Do not modify it using the code editor.
			InitializeComponent();
		}
		
#endregion
		
		
#region Private Members
		
		private DotNetNuke.Entities.Modules.PortalModuleBase _loaderCtl;
		private FormSettings objFormSettings;
		private string strOperationSuccess;
		
#endregion
		
#region Event Handlers
		
		private void Page_Load(System.Object sender, System.EventArgs e)
		{
			try
			{
				UserController objUsers = new UserController();
				UserInfo objUser = UserController.GetCurrentUserInfo();
				
				if (!(objUser.IsSuperUser))
				{
					Response.Redirect("~/" + DotNetNuke.Common.Globals.glbDefaultPage);
				}
				
				this.LoaderCtl = (PortalModuleBase) this.Parent.Parent;
				
				strOperationSuccess = Localization.GetString("OperationSuccess", this.LocalResourceFile);
				this.lblHeading.Text = Localization.GetString("Heading", this.LocalResourceFile);
				
				objFormSettings = Utility.GetFormSettings(ModuleId);
				
				if (!Page.IsPostBack)
				{
					this.cmdDeactivte.OnClientClick = "if(!confirm(\'" + Localization.GetString("DeactivateLicense", this.LocalResourceFile) + "\')) return ";
					this.cmdRemoveExt.OnClientClick = "if(!confirm(\'" + Localization.GetString("RemoveExtensionLicense", this.LocalResourceFile) + "\')) return ";
					BindData();
				}
				
			}
			catch (Exception exc)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, exc.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
				DotNetNuke.Services.Exceptions.Exceptions.LogException(exc);
			}
		}
		
		protected void cmd_RefreshFromServerClick(System.Object sender, System.EventArgs e)
		{
			try
			{
				
			}
			catch (Exception ex)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, ex.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
			}
			
		}
		
		protected void cmdActivate_Click(System.Object sender, System.EventArgs e)
		{
			try
			{
				
			}
			catch (Exception ex)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, ex.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
			}
		}
		
		protected void cmd_UpdateDomainsClick(System.Object sender, System.EventArgs e)
		{
			try
			{
				
			}
			catch (Exception ex)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, ex.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
			}
		}
		
		protected void cmd_UpgradeTrialClick(System.Object sender, System.EventArgs e)
		{
			try
			{
				
			}
			catch (Exception ex)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, ex.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
			}
		}
		
		protected void cmd_DeactivteClick(System.Object sender, System.EventArgs e)
		{
			try
			{
				
			}
			catch (Exception ex)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, ex.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
			}
		}
		
		protected void cmd_ExtDomainsClick(System.Object sender, System.EventArgs e)
		{
			try
			{
				
				
			}
			catch (Exception ex)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, ex.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
			}
		}
		
		protected void cmd_ManualActivateClick(System.Object sender, System.EventArgs e)
		{
			try
			{
				
			}
			catch (Exception ex)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, ex.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
			}
		}
		
		protected void cmd_RemoveExtClick(System.Object sender, System.EventArgs e)
		{
			
		}
		
		protected void cmd_RemoveDomainsClick(System.Object sender, System.EventArgs e)
		{
			
		}
		
#endregion
		
		
#region Data Bind Methods
		
		private void BindData()
		{
			
			try
			{
			
				
				
			}
			catch (Exception ex)
			{
				DotNetNuke.UI.Skins.Skin.AddModuleMessage(_loaderCtl, ex.Message, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError);
			}
			
			
		}
		
#endregion
		
		
#region Public Properties
		public PortalModuleBase LoaderCtl
		{
			get
			{
				if (_loaderCtl == null)
				{
					_loaderCtl = this;
				}
				
				return _loaderCtl;
			}
			set
			{
				_loaderCtl = value;
			}
		}
#endregion
		
		
	}
	
}


